<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    * {
      padding: 0;
      margin: 0;
    }

    .clearfix:after{/*伪元素是行内元素 正常浏览器清除浮动方法*/
        content: "";
        display: block;
        height: 0;
        clear:both;
        visibility: hidden;
    }
    .clearfix{
        *zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行，其他浏览器不执行*/
    }
    .imgBox{
      width: 100%;
      max-width: 1920px;
      min-width: 1200px;
      max-height: 450px;
      overflow: hidden;
      margin: 0 auto;
    }
    /* .imgBox .item:nth-child(-n+2){
      float: left;
    }
    .imgBox .item:nth-child(n+3){
      float: right;
    } */
    .imgBox .item {
      box-sizing: border-box;
      float: left;
      position: relative;
      width: 25%;
      height: 440px;
      overflow: hidden;
      background-color: pink;
      /* margin-left: 8px; */
    }
    /* .imgBox .item:nth-child(-n+3){
      margin-right: 10px;
    } */
    /* .imgBox .item:nth-child(1){
      margin-left: 10px;
    } */
    .imgBox .mask {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.6);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .imgBox p {
      color: #fff;
      font-weight: 600;
      font-size: 24px;
    }

    .imgBox .img2 {
      width: 670px;
      /* height: 100%; */
    }

    .cankao{
      width: 1920px;
      height: 200px;
      margin: 0 auto;
      background-color: blue;
    }
  </style>
</head>

<body>
  <div class="cankao"></div>
  <div class="imgBox clearfix">
    <div class="item fir">
      <!-- <img class="img1" src="https://img.xiaohucloud.com/res/100511/2021/04/15/100511-mBPtRs.png" alt=""> -->
      <img class="img2 left" src="https://img.xiaohucloud.com/res/100511/2021/04/19/100511-EVLRaS.jpg" alt="">
      <div class="mask">
        <p class="tit">美妆洗护</p>
        <p class="entit">MAKE UP</p>
      </div>
    </div>
    <div class="item sec">
      <!-- <img class="img1" src="https://img.xiaohucloud.com/res/100511/2021/04/15/100511-VXVuUK.png" alt=""> -->
      <img class="img2 left" src="https://img.xiaohucloud.com/res/100511/2021/04/19/100511-wkCsYu.jpg" alt="">
      <div class="mask">
        <p class="tit">食物</p>
        <p class="entit">FOOD</p>
      </div>
    </div>
    <div class="item thir">
      <!-- <img class="img1" src="https://img.xiaohucloud.com/res/100511/2021/04/15/100511-LzXXsn.png" alt=""> -->
      <img class="img2 right" src="https://img.xiaohucloud.com/res/100511/2021/04/19/100511-NCvKcj.jpg" alt="">
      <div class="mask">
        <p class="tit">玩具</p>
        <p class="entit">TOY</p>
      </div>
    </div>
    <div class="item for">
      <!-- <img class="img1" src="https://img.xiaohucloud.com/res/100511/2021/04/15/100511-OLuwTo.png" alt=""> -->
      <img class="img2 right" src="https://img.xiaohucloud.com/res/100511/2021/04/19/100511-RcYcyV.jpg" alt="">
      <div class="mask">
        <p class="tit">3C</p>
        <p class="entit">3C PRODUCTS</p>
      </div>
    </div>
  </div>
  
  <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>

  <script>

    $(function () {

      var speed = 500;

      $(".imgBox .item").hover(function () {
        console.log(111);
        // $(this).siblings().stop(true)
        $(this).stop().animate({ width: "33%" }, speed).siblings().stop().animate({ width: '22%' }, 400)// 当鼠标移动到li上，当前变600 其余的兄弟变90

      }, function () {
        // $(this).stop()
        $(".imgBox .item").stop(true).animate({ width: "25%" }, speed)

        // 鼠标离开的时候，快速复原

      });
    })



  </script>
</body>

</html>